//
//  LOLBaseCollectionView.m
//  LOLXXbox
//
//  Created by mac on 16/1/27.
//  Copyright © 2016年 Grasstrio. All rights reserved.
//

#import "LOLBaseCollectionView.h"

@implementation LOLBaseCollectionView

-(instancetype)initWithFrame:(CGRect)frame
          flowLayoutItemSize:(CGSize)size
                      xSpace:(CGFloat)x
                      ySpace:(CGFloat)y
                sectionInSet:(UIEdgeInsets)Inset
                        cell:(Class)cell
                       reuse:(NSString *)reuse

{
    
    UICollectionViewFlowLayout *flowLayout=[[UICollectionViewFlowLayout alloc]init];
    flowLayout.itemSize=size;
    //设置行间距
    flowLayout.minimumLineSpacing=x;
    //设置列间距
    flowLayout.minimumInteritemSpacing=y;
    flowLayout.sectionInset=Inset;
    
    if (self=[super initWithFrame:frame collectionViewLayout:flowLayout]) {
        
        self.backgroundColor=[UIColor whiteColor];
        [self registerClass:cell forCellWithReuseIdentifier:reuse];
        
        
    }
    self.backgroundColor=[UIColor whiteColor];
    
    
    
    return self;
    
}



@end
